import { createApp } from 'vue'
import App from './App.vue'
import router from '@/router'  // 简写路径
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import { createPinia } from 'pinia'
// 全局样式（如果是第三方库的样式，保留此处；否则移到 App.vue）
import './style.css'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
const app = createApp(App)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}
app.use(router)
app.use(ElementPlus)
app.use(createPinia())
// 可选：路由初始化完成后挂载
router.isReady().then(() => {
    app.mount('#app')
})